import numpy as np
import pandas as pd
from scipy.stats import shapiro
ages = np.array([1,5,10,40,36,12,58,62,77,36,89,100,89,18,20,25,30,32])
cages=pd.cut(ages,bins=5,precision=0)
print(f"等宽分割结果:{cages}")
labels=[u"婴儿",u"青年",u"中年",u"壮年",u"老年"]
la_ages=pd.cut(ages,bins=5,labels=labels,precision=0)